home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / tcp / cp5.lha / cp5 / docs / demon_link.example < prev    next >
Text File  |  1995-10-21  |  3KB  |  77 lines

  1. /*rx
  2.  * DEMON INTERNET Amiga Installation
  3.  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.  *
  5.  * NAME
  6.  *   link -- Control the state of the AmiTCP connection
  7.  * USAGE
  8.  *   link up|down [news]
  9.  * PURPOSE
  10.  *   This script makes using AmiTCP on a dialup to Demon much easier. You
  11.  *   can connect/disconnect by entering  or . I have
  12.  *   Alt-F6 set to issue  and Alt-F7 
  13.  *   Important variables are stored below. This script is really only
  14.  *   useful when used with GWCSlip, which is what I recommend for all DIS
  15.  *   AmiTCP users.
  16.  *   The NEWS parameter allows you to pull news after connecting too
  17.  * NOTES
  18.  *  -I personally have AmiTCP running all the time (I moved most of the
  19.  *   startnet script to s:startup-sequence and modified it so that it
  20.  *   doesn't bring GWCSLIP up or try to grab the serial port). You could
  21.  *   easily bring AmiTCP up/test for it though I haven't bothered adding
  22.  *   such tests here... Testing for TCP: is an easy way to do this!
  23.  *  -When the link is dropped, the routes are also deleted; hopefully this
  24.  *   should make this script fairly well suited to the PPP device now
  25.  *   available for AmiTCP.
  26.  */
  27.  
  28. /* VARIABLES - Modify these for your setup */
  29. myip = "158.152.59.173"       /* My IP number */
  30. mydev = "devs:networks/gwcslip.device"    /* Slip Device being used */
  31. mydevu = "0"               /* Unit Number */
  32. myif = "cslip"||mydevu        /* Interface name (amitcp 3.0) */
  33. myhost = "158.152.1.65"       /* Gate */
  34. rcmd = "AmiTCP:bin/route"
  35. ifcmd = "AmiTCP:bin/ifconfig"
  36.  
  37. /* THE SCRIPT PROPER */
  38.  
  39. address command
  40. arg which news
  41.  
  42. if which="" then say "No command specified - try UP or DOWN"
  43. if which~="UP" & which~="DOWN" then say "Invalid command '" || which || "' - try UP or DOWN"
  44. if news~="NEWS" & news ~= "AUTONEWS" & news~="" then say "Invalid parameter '" || news || "' - only understand 'news'"
  45. else if which="UP" then do
  46.    ifcmd myif myip myhost "netmask 255.255.0.0"
  47.    "AmiTCP:bin/online" mydev mydevu
  48.    rcmd "add default" myhost
  49.  
  50. /* The following line tells Control Panel 5 that you are connected */
  51.  
  52.    address cp5port "GO_CONNECTED Newmarket 0638 999 999"
  53.  
  54. */ End Of Addition */
  55.  
  56.    "AmiTCP:bin/mailkick post.demon.co.uk handletos logsends"
  57.    if news="NEWS" | news="AUTONEWS" then do
  58.       say "Slurping news (until it works!)...\n"
  59.       "execute AmiTCP:bin/nntptransfer AUTONEWS"
  60.    end
  61. end
  62. else if which="DOWN" then do
  63.    "AmiTCP:bin/mailkick quit"
  64.    ifcmd myif "down"
  65.    "AmiTCP:bin/offline" mydev mydevu
  66.  
  67. /* The following line tells Control Panel 5 that you have disconnected */
  68.  
  69.    address CP5port "GO_DISCONNECTED"
  70.  
  71. /* End Of Addtion */
  72.  
  73.    rcmd "delete" myhost
  74.    rcmd "delete default"
  75. end
  76.  
  77.